package com.itdao.dp.strategy.duck.holder;

import com.itdao.dp.strategy.duck.behavior.fly.FlyBehavior;
import com.itdao.dp.strategy.duck.behavior.quack.QuackBehavior;
import com.itdao.dp.strategy.duck.behavior.swim.SwimBehavior;

public abstract class Duck {
    protected FlyBehavior flyBehavior;
    protected QuackBehavior quackBehavior;
    protected SwimBehavior swimBehavior;

    public abstract void display(); /*简介*/

    public abstract void fly(); /*飞行*/

    public abstract void quack(); /*叫*/

    public abstract void swim(); /*游泳*/

    public void setFlyBehavior(FlyBehavior flyBehavior) {
        this.flyBehavior = flyBehavior;
    }

    public void setQuackBehavior(QuackBehavior quackBehavior) {
        this.quackBehavior = quackBehavior;
    }

    public void setSwimBehavior(SwimBehavior swimBehavior) {
        this.swimBehavior = swimBehavior;
    }
}
